package com.wf.mock.app.mina.old;


import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IoSession;

public class NewClientHandler extends IoHandlerAdapter {

	@Override
	public void sessionCreated(IoSession session) throws Exception {
		System.out.println("sessionCreated: Thread:"
				+ Thread.currentThread().getName() +"+++" + session.getLocalAddress());
	}

	public void sessionOpened(IoSession session) throws Exception {
//		session.write("portal@buildConnect");
		System.out.println("sessionOpened: Thread:"
				+ Thread.currentThread().getName() +"+++" + session.getLocalAddress());
	}

	public void messageReceived(IoSession session, Object message)
			throws Exception {
		System.out.println(" messageReceived : Thread:"
				+ Thread.currentThread().getName() + " msg:" + message +"+++" + session.getLocalAddress());
	}

	public void messageSent(IoSession session, Object message) throws Exception {
		System.out.println(" messageSent: Thread:"
				+ Thread.currentThread().getName() + "msg:" + message +"+++" + session.getLocalAddress());
	}

}
